@extends('front.common.layout')

@section('content')
    <!-- banner -->
    <div class="inner-banner has-base-color-overlay text-center"
         style="background: url({{ asset('/front/images/background/product-banner.jpg') }});">
        <div class="container">
            <div class="box">
                <h3>Product List</h3>
            </div>
        </div>
    </div>
    <div class="breadcumb-wrapper">
        <div class="container">
            <div class="breadcrumb_bar">
                <div class="breadcrumb_menu">
                    <ul class="link-list">
                        <li>
                            <a href="{{ url('/') }}">Home</a>
                        </li>
                        <li>
                            <a href="{{ url('products') }}">Product List</a>
                        </li>
                        <li>
                            {{ $data['info']->product_name }}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- banner end -->
    <section class="service-single">
        <div class="container">
            <div class="row">
                <div class="col-md-3">
                    <div class="service-sidebar">
                        <div class="sidebar-widget downloads">
                            <ul class="download-list">
                                <li><a href="#"><span class="fa fa-file-pdf-o"></span> Download via . Pdf</a></li>
                            </ul>
                        </div>
                        <br>
                        <div class="popular_news">
                            <div class="inner-title">
                                <h3>Products</h3>
                            </div>
                        </div>
                        <ul class="service-catergory">
                            @foreach($data['products'] as $v)
                                <li>
                                    <a href="{{ url('product-detail',$v->url) }}">{{ $v->product_name }}</a>
                                    <span class="view-all-icon fa fa-caret-right"></span>
                                </li>
                            @endforeach
                        </ul>
                        <br>
                        <div class="popular_news">
                            <div class="inner-title">
                                <h3>Contact Us</h3>
                            </div>
                            <div class="text">
                                <p>If you have any questions or Suggestions about our products or services, please feel free to contact us at any time! Our technical engineers will give you detailed answers.</p>
                            </div>
                            <br>
                            <div class="default-cinfo">
                                <div class="acc-content collapsed">
                                    <ul class="contact-infos">
                                        <li>
                                            <div class="icon_box">
                                                <i class="fa fa-map-marker"></i>
                                            </div>

                                            <div class="text-box">
                                                <p><b>Address:</b>
                                                    <br>{{ config('web_config.address') }}</p>
                                            </div>

                                        </li>
                                        <li>
                                            <div class="icon_box">
                                                <i class="fa fa-phone"></i>
                                            </div>

                                            <div class="text-box">
                                                <p><b>Call Us:</b>
                                                    <br> <a href="tel:{{ config('web_config.tel') }}">{{ config('web_config.tel') }}</a>
                                                    <br> <a href="tel:{{ config('web_config.phone') }}">+{{ config('web_config.phone') }}</a></p>
                                            </div>

                                        </li>
                                        <li>
                                            <div class="icon_box">
                                                <i class="fa fa-envelope"></i>
                                            </div>

                                            <div class="text-box">
                                                <p><b>Mail Us:</b>
                                                    <br> <a href="mailto:{{ config('web_config.email_1') }}">{{ config('web_config.email_1') }}</a>
                                                    <br> <a href="mailto:{{ config('web_config.email_2') }}">{{ config('web_config.email_2') }}</a>
                                                </p>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-9">
                    <div class="outer-box">
                        <div class="video-column">
                            <div id="productBanner" class="carousel slide" data-ride="carousel">
                                <ol class="carousel-indicators">
                                    @foreach($data['info']->prooduct_banner as $k)
                                        @if($loop->first)
                                            <li data-target="#productBanner" data-slide-to="{{ $k }}" class="active"></li>
                                        @else
                                            <li data-target="#productBanner" data-slide-to="{{ $k }}"></li>
                                        @endif
                                    @endforeach
                                </ol>
                                <div class="carousel-inner">
                                    @foreach($data['info']->prooduct_banner as $v)
                                        @if($loop->first)
                                            <div class="carousel-item active">
                                                <img src="{{ $v }}" class="d-block w-100" alt="...">
                                            </div>
                                        @else
                                            <div class="carousel-item">
                                                <img src="{{ $v }}" class="d-block w-100" alt="...">
                                            </div>
                                        @endif
                                    @endforeach
                                </div>
                                <a class="carousel-control-prev" href="#productBanner" role="button" data-slide="prev">
                                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                    <span class="sr-only">Previous</span>
                                </a>
                                <a class="carousel-control-next" href="#productBanner" role="button" data-slide="next">
                                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                    <span class="sr-only">Next</span>
                                </a>
                            </div>
                        </div>
                        <div class="product-detail">
                            <div class="inner-title">
                                <h3><strong>{{ $data['info']->product_name }}</strong></h3>
                            </div>
                            {!! $data['info']->product_content !!}
                        </div>
                    </div>
                    <div class="sec-title" ></div>
                    <hr>
                    <div class="sec-title" >
                        <h2>Order Online</h2>
                    </div>
                    <div class="default-form-area">
                        <form id="contact-form" name="contact_form" class="default-form" action="#" method="post">
                            <div class="row clearfix">
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <input type="text" name="form_name" class="form-control required" value=""
                                               placeholder="Name *" required="">
                                    </div>
                                </div>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <input type="email" name="form_email" class="form-control required email"
                                               value="" placeholder="Email *" required="">
                                    </div>
                                </div>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <input type="text" name="form_phone" class="form-control" value=""
                                               placeholder="Phone">
                                    </div>
                                </div>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <input type="text" name="form_product" class="form-control" value=""
                                               placeholder="Product">
                                    </div>
                                </div>
                                <div class="col-md-12 col-sm-12 col-xs-12">
                                    <div class="form-group">
                                        <textarea name="form_demands" class="form-control textarea required"
                                                  placeholder="Demands..."></textarea>
                                    </div>
                                </div>
                                <div class="col-md-12 col-sm-12 col-xs-12">
                                    <div class="form-group m-0">
                                        <input id="form_botcheck" name="form_botcheck" class="form-control"
                                               type="hidden" value="">
                                        <button class="btn-style-one" type="submit" data-loading-text="Please wait...">
                                            send message
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>



@endsection

@section('script')
    <script>
        //Filter-list
        if($('#product-list').length){
            var first_item = $('.filter-btns li').first().data('filter')
            console.log(first_item)
            $('#product-list').mixItUp({})
        }
    </script>
@endsection
